package com.heima.user.feign;

import com.heima.common.dto.ResponseResult;
import com.heima.user.dto.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

//自媒体远程接口
@FeignClient("leadnews-media")
public interface MediaClient {

    /**
     * 保存自媒体用户
     * @param user
     * @return
     */
    @PostMapping("/api/v1/user")
    ResponseResult<WmUser> saveMediaUser(@RequestBody WmUser user);

    /**
     * 更新自媒体用户
     * @param user
     * @return
     */
    @PutMapping("/api/v1/user")
    ResponseResult updateMediaUser(@RequestBody WmUser user);
}
